<?php
/**
 * 电子书控制器
 */
class Index extends BaseAction
{
	/**
	 * 初始化
	 */
	public function _init()
	{

	}

	/**
	 * 默认动作
	 */
	protected function _default()
	{
	   $sql = "select * from ebook where status=2 order by language asc";
       $res = DB::select($sql);
	   if($res){
		 foreach ($res as $k=>$v){
			  $res[$k]['BPATH'] = Func::imageSrcHandle($v['PATH'],'z','auto*auto',1);
		 }
	   }
       $this->assign('nums',count($res));
       $this->assign('list',$res);
	   $this->tpl_full_path('/front/eBooks/index');
	}




}
?>
